package com.dshore.messagecenter;

import java.util.TimeZone;

import javax.annotation.PostConstruct;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.dshore.messagecenter.util.secret.AESGCMUpdateAAD2;

@EnableScheduling
@EnableTransactionManagement
/*@EnableEurekaClient*/
@SpringBootApplication
@ServletComponentScan
public class SgMessageCenterManageApplication {

	public static void main(String[] args) throws Exception {
		SpringApplication.run(SgMessageCenterManageApplication.class, args);
		String key="33ab8fd7430f4ca89bdaa4==";
		String newPass=AESGCMUpdateAAD2.encript(key,"test");
		System.out.println(newPass);
		String pass=AESGCMUpdateAAD2.decript(key,newPass);
		System.out.println(pass);
	}
	
	@PostConstruct
	void setDefaultTimeZone() {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
//		TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
	}
	
}
